/*
 * @Description: 部门路由
 * @Version: 2.0
 * @Autor: kafei
 * @Date: 2021-11-26 16:42:27
 * @LastEditors: kafei
 * @LastEditTime: 2021-11-30 18:12:38
 */
const {
  getAllDepartMentController,
  getUserByDeptIdController,
  getAllListDepartMentController
} = require('../controller/departMentController')
const getDepartMentApi = (router) => {
  router.get('/getAllDepartMent', async (ctx) => {
    const result = await getAllDepartMentController()
    ctx.body = result
  })
  router.get('/getUserByDeptId', async (ctx) => {
    const result = await getUserByDeptIdController(ctx)
    ctx.body = result
  })

  router.get('/getAllListDepartMentController', async (ctx) => {
    const result = await getAllListDepartMentController()
    ctx.body = result
  })
}
module.exports = getDepartMentApi
